import os
from pathlib import Path


class Settings:
    # 基础配置
    PROJECT_NAME = "Image Upload Service"
    VERSION = "1.0.0"

    # 上传文件配置
    UPLOAD_DIR = "uploads"
    MAX_FILE_SIZE = 5 * 1024 * 1024  # 5MB

    # CORS配置
    CORS_ORIGINS = ["*"]

    def __init__(self):
        # 确保上传目录存在
        if not os.path.exists(self.UPLOAD_DIR):
            os.makedirs(self.UPLOAD_DIR)


# 创建全局配置实例
settings = Settings()